<script setup lang="ts">
// element语言包
// import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
// import en from 'element-plus/dist/locale/en.mjs'
// import { ref } from 'vue';
// import {useI18n} from 'vue-i18n'
import headerCommon from '@/components/layout/headerCommon.vue'
import footerCommon from '@/components/layout/footerCommon.vue'

import { useRoute } from 'vue-router'
import { key,useStore }  from '@/store'

const route = useRoute()
const store = useStore()

// const {locale:localeLanguage,t} = useI18n()
// const locale =ref(zhCn)
// const changeLang = (Language: any)=>{
//   locale.value = Language
//   localeLanguage.value = Language.name
//   console.log("Language:",Language.name);//Language: {name: 'en', el: {…}}
// }

</script>
  
<template>

  <el-config-provider :locale="store.state.locale">
   <!-- <button @click="changeLang(en)">英文</button> -->
   <!-- <button @click="changeLang(zhCn)">中文</button>  -->
   <!-- <router-link to="/home">首页</router-link> -->
 <!-- <router-link to="/mine">个人中心</router-link> --> 
  <!-- 头部 -->
  <headerCommon v-show="!route.fullPath.includes('login')"/>
  <!-- 主体 --> 
  <div class="container">
      <router-view />
  </div>
   <!-- 尾部 -->
  <footerCommon v-show="!route.fullPath.includes('login')" />
</el-config-provider>
</template>

<style lang="scss" scoped>
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
</style>
